This function is designed to find interval values between integers in an integer list.
(get-interval :all '(1 2 3 4 6 -6))
=> (1 1 1 2 -12)
In the above example the output describes :all the interval relationships in the list. With the type parameter :all-rand the interval value between the last and first integers may be added to the output list, as below:
(get-interval :all-rand '(1 2 3 4 6 -6))
=> (1 1 1 2 -12 -7)
With the type setting :rand an interval value between the last and first integers:
(get-interval :rand '(1 2 3 4 6 -6))
=> -7
With the type setting :max the largest interval in the list may be located and described:
When music is in a chromatic tonality a symbol list or lists may be analysed for intervals.
(get-interval :all '((a b c d e h) (d e f a h l)))
=> ((1 1 1 1 3) (1 1 -5 7 4))
(get-interval :max '((a b c d e h) (d e f a h l)))
=>(3 7)
Using the parameter setting :start-symbol the first symbol in a sequence of lists may be extracted into a single list. The following sequence of examples demonstrates the interchangability possible between symbols and integers.
(get-interval :start-symbol '((a b c d e h) (d e f a h l)))
=> (a d)
(setq scale-list
(cfunction
(gen-noise-white 20 0.1 0.5) (g-integer 1 12)))
=> (6 10 12 10 10 3 6 6 10 7 7 1 3 2 3 9 1 3 1 9)
(setq scale-list1
(cfunction
(gen-noise-white 20 0.1 0.5) '(a b c d e f g h i j k l)))